package com.applcn.message.client;

import com.applcn.core.base.Result;
import com.applcn.message.MessageConstant;
import com.applcn.message.dto.SendSmsCodeDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * com.example.message.client
 * Description:
 *
 * @author: 大妖怪
 * @date: 2020-02-06 14:20
 */
@FeignClient(name = MessageConstant.SERVICE_NAME, url = "${applcn.message-service-endpoint}", path = "/feign/message")
public interface SmsClient {

    /**
     * 发送短信验证码
     * @return
     */
    @PostMapping("/sendSmsCode")
    Result sendMessage(@RequestBody @Validated SendSmsCodeDTO sendSmsCodeDTO);
}
